﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Resources;
using Another;
using Another2;
using CacheLoader;
using GalaSoft.MvvmLight;
using ToolkitContainer;

namespace IsoCache.ViewModel
{
    /// <summary>
    /// This class contains properties that the main View can data bind to.
    /// </summary>
    public class MainViewModel : ViewModelBase
    {
        public Loader Loader
        {
            get { return _loader; }
            set
            {
                _loader = value;
                RaisePropertyChanged("Loader");
            }
        }
        private string _welcome;
        private Loader _loader;

        public string Welcome
        {
            get
            {
                return "Stam";
                // This class is not available until the Loader load it. 
                //DataClass1 x = new DataClass1();
                //return x.Data;
            }
            set
            {                //_welcome = value;
                //RaisePropertyChanged("Welcome");

            }

        }

        public string Stam2
        {
            get
            {
                return new Stam2().Data;
            }
        }

        public string AnotherString
        {
            get { return new Class1().Data; }
        }
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel()
        {
            if (IsInDesignMode)
            {
                // Code runs in Blend --> create design time data.
            }
            else
            {
                // Code runs "for real"
            }
        }

        ////public override void Cleanup()
        ////{
        ////    // Clean up if needed

        ////    base.Cleanup();
        ////}
    }
}